package boss.portal.controller;

import boss.portal.param.PowerOnRequest;
import boss.portal.service.impl.ChargeServiceImpl;
import boss.portal.service.impl.WebClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

@RestController
public class ChargeController extends BaseController{

    @Autowired
    ChargeServiceImpl chargeService;

    //调用上电
    @PostMapping("/v1/api/charge/poweron")
    public Flux<String> doCharge(@RequestBody PowerOnRequest request,
                                 @RequestHeader("deviceNo") String deviceNo){
        return chargeService.doPowerOn(request,deviceNo);
    }

}
